<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<#assign path="${request.getContextPath()}"> 
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="${path}/js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${path}/js/jquery/jquery.form.js"></script>
<script type="text/javascript">
function uploadImage() {
    $(document).ready(function() {
        var options = {
            url: "${path}/testfileUpload.do",
            type: "POST",
            dataType: "script",
        };
        $('#myForm').ajaxSubmit(options);
        return false;
    });
}
</script>
</head>
<body>

<form id="myForm" enctype ="multipart/form-data">
<input type="file" name="fileToUpload"/>
<input type="text" name="testField" value="testFieldValue"/>
<input type="submit" onclick="uploadImage()" value="upload"/>
</form>

</body>
</html>